home *** CD-ROM | disk | FTP | other *** search
/ HPAVC / HPAVC CD-ROM.iso / ELYVER10.ZIP / ELYSIUM.TXT next >
Text File  |  1997-01-25  |  15KB  |  283 lines

  1. oOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoO
  2.  
  3. +ELYSiUM's IBM PC MS-DOS VGA Graphics & Sound Blaster Programming Reference
  4.  List for the C++ and Assembly Languages
  5.  
  6. +Maintainer : ELYSiUM who can be contacted via e-mail at ELYSiUM@Bigfoot.com
  7. +Version    : 1.0
  8. +Date       : January 23, 1997 A.D.
  9. +Notes      : This file is best viewed using MS-DOS Editor
  10.  
  11. oOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoO
  12.  
  13. =Introduction
  14.  
  15.  Welcome. This file is a list of resources that I have found to be the best
  16. ways to learn how to do IBM PC MS-DOS VGA graphics & Sound Blaster
  17. programming in the C++ and Assembly Languages. In order to be able to
  18. successfully learn, you must have the following knowledge:
  19.  
  20.  - You know the basics of a computer. How most computer parts work, what
  21.    RAM, VGA, BIOS, and other computer components are, what they do, and
  22.    how they work.
  23.  
  24.  - You own an IBM PC(or 100% compatible) computer that is running MS-DOS
  25.    and a C++ development environment. [Note: The specific books, or
  26.    electronic documents, will tell you what the author used for the source
  27.    code that was included.]
  28.  
  29.  - You know how to thoroughly operate an IBM PC(or 100% compatible) computer
  30.    running MS-DOS.
  31.  
  32. -/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/
  33.  
  34. =Step 1: Can You Hack it?
  35.  
  36.  So, you would like to make powerful graphics and sound programs? I'm
  37. assuming you are already a computer "power-user," because you have the guts
  38. to take up programming as your new hobby/career. I also am assuming you
  39. don't have any programming knowledge at all, but that you know a lot about
  40. the MS-DOS computer you are running. If you don't know a lot about computers,
  41. you should not be reading this document for you are not experienced enough
  42. to being programming. If you don't know the answers to every one of these
  43. questions, you should not be reading this document.
  44.  
  45.   1.) What is MS-DOS, what company makes it, and what does it do?
  46.   2.) What is a program, and how do you start a program?
  47.   3.) Explain what the following are: Hard Drive, RAM, BIOS, VGA, ISA, PCI,
  48.       Sound Blaster, pixel, hexadecimal, software, hardware, MHz, CPU, 486,
  49.       Pentium, Pentium Pro, MMX, Bill Gates, Microsoft, 8086, Intel,
  50.       resolution, bit, byte, kilobyte, megabyte, gigabyte, terabyte, drive
  51.       bay, CD-ROM, disk/diskette, DOS Editor, defrag, virus, interrupt, DMA,
  52.       Internet, modem, serial port, PS/2 port, and Windows Control Panel.
  53.   4.) Explain what the following MS-DOS commands do: CD, MD, RD, DEL, ERASE,
  54.       DELTREE, COPY, and MOVE.
  55.   5.) What would the numbers 320x200 or 640x480 usually refer to?
  56.   6.) What type of files would the following file extensions refer to: TXT,
  57.       ZIP, INI, SYS, BAT, ARJ, LZH, COM, EXE, DIZ, DRV, HTM, GIF, PCX, JPG,
  58.       BMP, AVI, MPG, WAV, VOC, MOD, and ICO.
  59.   7.) How do you cut and paste text from one place to another?
  60.   8.) What is DOOM?
  61.   9.) What do the files AUTOEXEC.BAT and CONFIG.SYS do?
  62.  10.) What does HIMEM.SYS and PROMPT $P$G do?
  63.  11.) What is a programmer?
  64.  
  65. -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  66.  
  67. =Step 2: What type of programming will we be doing?
  68.  
  69.  Programming is also know as "coding." This is because the text that a
  70. programmer writes to make a program is known as the "source code," or just
  71. the "code." So the two words programmer and coder are interchangable, as well
  72. as programming and coding. Anyways, I'm assuming you have absolutely no
  73. knowledge whatsoever of programming. I personally, as well as many others,
  74. believe that the C++ programming language is the best all-around language. I
  75. also believe that Assembly language is _very_ important to obtain more
  76. control of the computer and to also create faster programs. The reason why
  77. Assembly language is so fast is because it is a "low-level language." This
  78. means that it is very close to the computer hardware, whereas languages like
  79. C++ are farther away from the hardware. However, there is a trade-off for the
  80. speed of Assembly language, and that trade-off is that it is one of the
  81. hardest languages to learn because it is so cryptic. For example, these two
  82. examples of code do the same exact thing but one is in C++, and the other is
  83. in Assembly. [Note: From now on, this document will use "ASM" in place of the
  84. word "Assembly."]
  85.  
  86. [C++]
  87.  
  88.   cout << "Hello, World!";
  89.  
  90.  
  91. [ASM]
  92.  
  93.   Message  db  'Hello, World.$'
  94.   mov      ax,seg Message
  95.   mov      ds,ax
  96.   mov      dx,offset Message
  97.   mov      ah,9
  98.   int      21h
  99.  
  100.  Now, both of these lines do the same exact thing, they print out on the
  101. monitor the following words: "Hello, World!". Which you may have been able
  102. to tell, is that the ASM version is _much_ longer than the C++ version. Now
  103. you can visually see the trade-off of speed for ease of programming.
  104.  
  105.  C++ is a fast language, faster than others like BASIC, but for graphics
  106. programming, it is not always fast enough. However, ASM is as fast as you
  107. need. Most people do not like to write entire programs in ASM because it is
  108. so complex, C++ on the other hand is not so complex, but is the next most
  109. powerful language. So, we have a problem: How can we create a fast graphics
  110. program that is not too complex to write? The answer is actually quite
  111. simple. All you must do is take advantage of what is called, "Inline
  112. Assembly"(or Inline ASM). The name describes what it is and does. Inline ASM
  113. allows you to place ASM source code in the middle of your C++ programs! This
  114. way you can write your main program in C++, which will keep it easy to
  115. follow and modify, but your graphics will be very fast because your program's
  116. special "functions" that do things like plot a pixel on the screen will be
  117. made out of ASM!
  118.  
  119.  Now that you know what two languages you will be dealing with, how they work,
  120. and what their advantages and disadvantages are, we can proceed to the next
  121. step...
  122.  
  123. -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  124.  
  125. =Step 3: How to actually program/code.
  126.  
  127.  Now you know what program's look like before they are turned into EXE or
  128. COM files. Basically, just a bunch of text similar to the text you saw in
  129. Step 2. But before you learn how to start programming graphics, sound, and
  130. music. You have to learn the languages themselves: how they work, how to use
  131. them, how to turn your "source code" into executable files, and etc. The
  132. first language you are going to learn is C++. Not ASM, because the main
  133. bulk of your programs will be made out of C++, and not ASM. The C++
  134. language is not the easiest language to learn, but it is by far _not_
  135. the hardest. The following is a wonderful book that will teach you the
  136. principles of programming, the entire base C++ language, and by the end of
  137. the book, you will be able to create your own complex text-based programs
  138. easily. The book even includes a disk with a "lite" version of Borland's
  139. Turbo C++ 3.0 development environment. It doesn't create executable(EXE)
  140. files, it just runs them from the program itself. If you want the full
  141. version of Borland Turbo C++ 3.0 instead of the included "lite" version, you
  142. can buy it from your local computer store or direct from borland for a price
  143. range of $70-$100 USA. The book itself can also be found at your local
  144. computer store, book store, and direct from Sams Publishing. (Note: The
  145. disk with the lite version of Turbo C++ also includes all source code from
  146. the book).
  147.  
  148.  * C++ Programming in 12 Easy Lessons, Greg Perry, Sams Publishing, ISBN
  149.    0-672-30522-4 (with disk), $39.99 USA, 1-800-428-5331 USA
  150.  
  151. -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  152.  
  153. =Step 4: Done with basic C++, on with graphics!
  154.  
  155.  Now that you have mastered the basics of C++ programming, let's do some
  156. graphics programming! The next documents you are going to read are documents
  157. authored by a "demo group" coder(Note: If you do not know what a "demo,"
  158. and a "demo group" is, visit http://www.cdrom.com/pub/demos/ to learn about
  159. demos. I am not reffering to game or software demo's). The author's name
  160. is Grant Smith, best known as Denthor of the demo group "Asphyxia." He
  161. had originally written the documents in Pascal(a programming language quite
  162. similar to C++), but another demo group member named Christopher G. Mann,
  163. best known as Snowman of the demo group named "Hornet." Anyways, the
  164. documents are a series of tutorials teaching how to get into the VGA graphics
  165. mode and how to do things like plot pixels to a screen, all the way up to
  166. how to draw 3-D cubes and rotate them all around. The tutorials _do_ include
  167. a tad bit of ASM code in them, but it is not too much and you will still be
  168. able to learn how to create graphics programs without knowing ASM. The name
  169. of the tutorial series is simply, "The VGA Trainer Program." I have included
  170. the firs 10 lessons of the series. The following files should have been
  171. inside of the ZIP file you got this text file from:
  172.  
  173.  * TUT01NEW.ZIP - Lesson 1
  174.  * TUT02NEW.ZIP - Lesson 2
  175.  * TUT03NEW.ZIP - Lesson 3
  176.  * TUT04NEW.ZIP - Lesson 4
  177.  * TUT05NEW.ZIP - Lesson 5
  178.  * TUT06NEW.ZIP - Lesson 6
  179.  * TUT07NEW.ZIP - Lesson 7
  180.  * TUT08NEW.ZIP - Lesson 8
  181.  * TUT09NEW.ZIP - Lesson 9
  182.  * TUT10NEW.ZIP - Lesson 10
  183.  
  184. -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  185.  
  186. =Step 5: Assembly Language
  187.  
  188.  As you can see, the only ASM code was in specific functions such as a
  189. Putpixel function or a Line function. You probably figured out a little of
  190. what the ASM code meant, but you need to know more. This is because if you
  191. do not, you will not be able to develop your own custom ASM functions. The
  192. following is an excellent web site that teaches you ASM programming for x86
  193. computers. Read _everything_ on the web site. For example, if one of the
  194. sections is, "Basic Computer Parts," still read it even if you think you
  195. know everything about it. I say this because, for one, it will refresh your
  196. memory. And two, it will go in more detail then you expect. For example, do
  197. you know how many volts the CPU uses to turn one bit into an "off" or "on"
  198. position? Anyways, follow all the example programs and pratice a lot. ASM
  199. is probably the hardest language to learn. Also, once you have finished
  200. learning the tutorial, return to the "VGA Trainer Program," look at the
  201. source code files, and you will be amazed on how much more you will
  202. understand. In fact, I reccomend you go through the entire VGA Trainer
  203. Program, and you will learn a lot more.
  204.  
  205.  * Assembly Language Tutorial:
  206.    http://udgftp.cencar.udg.mx/ingles/tutor/Assembler.html
  207.  
  208. -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  209.  
  210. =Step 6: Power Graphics Programming
  211.  
  212.  Ever heard of a fellow named Michael Abrash? If you have not, he is a
  213. programmer at "id Software." He is known for his graphics programming
  214. brilliance and his brilliant graphics programming book. The book will teach
  215. you everything from low-level VGA hardware programming, to fast animation
  216. techniques, to 3-D algorithims, BSP trees, and even Quake! The book comes
  217. with a CD-ROM which includes all sample programs from the book, and also
  218. comes with a bonus. The bonus is a previous book that Michael Abrash wrote
  219. named "Zen of Assembler." The book is in electronic form on the CD-ROM. The
  220. book can be found at your local computer store, book store, or direct from
  221. the Coriolis Group.
  222.  
  223.  * Zen of Graphics Programming - 2nd Edition, Michael Abrash, Coriolis
  224.    Group, ISBN 0-672-30522-4 (with CD-ROM), $44.99 USA
  225.  
  226. -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  227.  
  228. =Step 7: Practice
  229.  
  230.  By now, you have mastered a lot of things. I suggest that you practice
  231. everything you have learned over and over again. It helps you think of new
  232. ideas, algorithims, and allows you to optimize your code. Graphics
  233. programming will soon be, if it now already is, second nature to you. Now
  234. you are probably wanting to know how to incorporate music and sound into
  235. your programs. That is next...
  236.  
  237. -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  238.  
  239. =Step 8: Sound and Music
  240.  
  241.  If you read the title of this file, you may have noticed that I will focus
  242. on programming for the Creative Labs Sound Blaster and 100% compatible
  243. sound cards. I personally feel that the Advanced Gravis Ultrasound is
  244. superior to the Sound Blaster, but unfortuanately, the Sound Blaster is a
  245. sound card that can be found in just about _every_ computer sold today. So
  246. I will focus on programming for the Sound Blaster only for compatibility's
  247. sake.
  248.  
  249.  The following files should be included in the ZIP file that you got this
  250. text file from:
  251.  
  252.  * MIKXMAS.ZIP - MikMod Version 2.10: A wonderful library to play many types
  253.                  of sound and music files.
  254.  
  255. -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  256.  
  257. =Conclusion
  258.  
  259.  If you ever have any troubles with any kind of programming. Do not be afraid
  260. or embarrassed to seek help. You can search for helpful web sites or files
  261. by using powerful search engines such as Alta Vista, which can be found at
  262. http://www.altavista.com
  263.  
  264.  Also, you can always e-mail the author's of documents like the VGA Trainer
  265. Program. Usually, the authors will not mind helping one who is serious about
  266. programming.
  267.  
  268.  In conclusion, I would like to say that I hope this file will help many
  269. people learn to program multimedia MS-DOS programs, whether it is a demo or
  270. a new game. If you felt it helped you in any way, please tell me so by
  271. dropping me a line or two at ELYSiUM@Bigfoot.com, and I would also like to
  272. mention that this is not my only file to be released. I will release a
  273. Version 2.0 of this file soon, or maybe Version 1.x, so keep watching for
  274. a new one wherever you found this file. But don not expect a new file too
  275. soon from the authored date of this one. Allow at least 3 months from the
  276. authoring date of this file until the new one. It might even take more time.
  277. Till next time, I'm ELYSiUM hoping I've helped all those who have wanted
  278. to begin programming multimedia programs. And one more thing, this is my
  279. first public release of anything, so please excuse any bugs and/or
  280. misspllelings. Ciao... :-)
  281.  
  282. -/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/
  283.